home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 2
/
The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO
/
prog
/
lvswin.zip
/
WINMOUSE.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1991-10-17
|
3KB
|
68 lines
/*
* LVS Windows
* The Window Class System
*
* Copyright 1991 (c), Lake View Software
* 4321 Harborough Rd.
* Columbus, OH 43220
* All rights reserved.
*/
// WinMouse.hpp
#ifndef WINMOUSE_HPP
#define WINMOUSE_HPP
#include "WinObj.Hpp"
/*
* Mouse Modes
*/
#define M_NONE 0 /* No mouse support */
#define M_SIMPLE 1 /* Simple cursor replacement Mode */
#define M_FULL 2 /* Full function mouse support */
#define DELTAX 16 /* amount of change to cause an arrow */
#define DELTAY 16 /* key when in simple mode */
#define PIXELS 8 /* Pixels / screen coordinate */
class WinMouse {
private:
int Mouse_Mode; /* Mouse Init flag / mode */
int Mouse_Buttons; /* Number of mouse button */
int Mouse_Hidden; /* Mouse hidden flag */
void scan_full (); /* Scan full mouse support */
public:
void clear_counters (); /* clear counters for mouse_scan */
void scan (); /* translate clicks to keys */
WinMouse (int mode = M_SIMPLE);
~WinMouse ();
void close (); /* close the mouse */
int init (int mode = M_SIMPLE); /* Mouse init function */
int get_mode (); /* Get current mouse mode */
void motion (int &y, int &x); /* Return micky motion in char */
void position (int y, int x); /* Position the mouse cursor */
int clicks (int button, int &y, int &x); /* get click count returns
position of last click */
int releases (int button, int &y, int &x); /* get click count returns
position of last release */
void show (); /* Display the mouse cursor */
void hide (); /* Hide the cursor */
int status (int &y, int &x); /* mouse status */
int x (); /* return current x coordinate */
int y (); /* return y coordinate */
void limit_x (int min, int max); /* limit mouse x coordinates */
void limit_y (int min, int max); /* limit mouse y coordinates */
int protect (int sr, int sc, int er, int ec); /* protect cursor */
};
/*
* Globals
*/
extern WinMouse Win_mouse;
int Win_mouse_mode (int mode = M_SIMPLE);
#endif // ndef WINMOUSE_HPP